<?php
class Zend_View_Helper_ShowCommentIndex {
    public function showCommentIndex($view) {

    	$comment = $view->Comments;
    	$str='';
        $str .= '<table id="product-table" border="0" cellpadding="0" cellspacing="0" width="100%">';
		$str .= '<tr>';
    	$str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">Id</a></th>';
    	$str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">Title</a></th>';
    	$str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">content</a></th>';
    	//$str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">content</a></th>';
    	$str .= '<th class="table-header-repeat line-left minwidth-2"><a href="">Thao Tác</a></th>';
		$str .= '</tr>';
		
		foreach ($comment as $comment) {
        	$str .= '<tr>'; 	
            $str .='<td>'.$comment->comment_id.'</td>';
            $str .='<td>'.$comment->title.'</td>';
            $str .='<td>'.$comment->content.'</td>';
            //$str .='<td>'.$comment->content.'</td>';
            $str .= '<td class="options-width">';
            $str .= '<a title="Sửa" class="icon-1 info-tooltip" href="'.$view->url(array('controller'=>'comment', 'action'=>'edit', 'comment_id'=>$comment->comment_id)).'"></a> ';
            $str .= '<a title="Thêm" class="icon-3 info-tooltip" href="'.$view->url(array('controller'=>'comment', 'action'=>'add','comment_id'=>$comment->comment_id)).'"></a>';
            $str .= '<a title="Xóa" class="icon-2 info-tooltip" href="'.$view->url(array('controller'=>'comment', 'action'=>'delete','comment_id'=>$comment->comment_id)).'"></a></td>';
            $str .='</tr>';
        }
        
        $str .= '</table>';
        
        return $str; 

    }
}